﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace IT_Pro
{
    public partial class frmCauHinh : DevExpress.XtraEditors.XtraForm
    {
        public frmCauHinh()
        {
            InitializeComponent();
        }

        private void btnCapNhat_Click(object sender, EventArgs e)
        {
            Class.RegistryWriter rg = new Class.RegistryWriter();
            if (rg.WriteKey("user", "itpro"))
            {
                MessageBox.Show("Cập nhật thành công");
                this.Close();
            }
            rg.WriteKey("pass", "itpta");
            
        }

        private void frmCauHinh_Load(object sender, EventArgs e)
        {
            
           txtUser.Text= Class.DataServices.readcauhinh("user");
           txtPass.Text = Class.DataServices.readcauhinh("pass");
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}